package exp2;

abstract class Factory {
    abstract public Data CreateDataObject();
}

class IntFactory extends Factory {
    public Data CreateDataObject(){
        return new Integer();
    }
}

class ByteFactory extends Factory{
    public Data CreateDataObject(){
        return new Byte();
    }
}

class ShortFactory extends Factory{
    public Data CreateDataObject(){
        return new Short();
    }
}

class BooleanFactory extends Factory{
    public Data CreateDataObject(){
        return new Boolean();
    }
}

class FloatFactory extends Factory {
    public Data CreateDataObject(){
        return new Float();
    }
}

class LongFactory extends Factory {
    public Data CreateDataObject(){
        return new Long();
    }
}

class DoubleFactory extends Factory {
    public Data CreateDataObject(){
        return new Double();
    }
}